package cn.jly.spring.annotation.ioc;

import cn.jly.spring.annotation.ioc.bean.Person;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author lanyangji
 * @description 基于xml的主类
 * @date 2020/11/12 上午 8:36
 */
public class MainXmlApp {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("classpath:spring-beans.xml");

        final Person person = applicationContext.getBean(Person.class);
        System.out.println("person = " + person);

        applicationContext.close();
    }
}
